<%--
  Created by IntelliJ IDEA.
  User: ZTZ
  Date: 2020/9/11
  Time: 15:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>超市订单管理系统</title>
    <link type="text/css" rel="stylesheet" href="../../statics/css/style.css" />
    <link type="text/css" rel="stylesheet" href="../../statics/css/public.css" />
    <script src="../../statics/js/jquery-1.9.1.min.js"></script>
</head>
<body>
<%@include file="index.jsp"%>
<c:if test="${requestScope.proInsertFlag>0}">
    <script>
        alert("添加成功！");
        window.location = "providerlist.jsp";
    </script>
</c:if>
<c:if test="${requestScope.proInsertFlag==0}">
    <script>
        alert("添加失败！");
    </script>
</c:if>
<div class="right">
    <div class="location">
        <strong>你现在所在的位置是:</strong>
        <span>供应商管理页面 >> 供应商添加页面</span>
    </div>
    <div class="providerAdd">
        <form  method="post" action="providerServlet?mode=insert" enctype="multipart/form-data">
            <!--div的class 为error是验证错误，ok是验证成功-->
            <div class="">
                <label for="proCode">供应商编码：</label>
                <input type="text" name="proCode" id="proCode" value="">
                <!-- 放置提示信息 -->
                <font color="red"></font>
            </div>
            <div>
                <label for="proName">供应商名称：</label>
                <input type="text" name="proName" id="proName" value="">
                <font color="red"></font>
            </div>
            <div>
                <label for="proContact">联系人：</label>
                <input type="text" name="proContact" id="proContact" value="">
                <font color="red"></font>

            </div>
            <div>
                <label for="proPhone">联系电话：</label>
                <input type="text" name="proPhone" id="proPhone" value="">
                <font color="red"></font>
            </div>
            <div>
                <label for="proAddress">联系地址：</label>
                <input type="text" name="proAddress" id="proAddress" value="">
            </div>
            <div>
                <label for="proFax">传真：</label>
                <input type="text" name="proFax" id="proFax" value="">
            </div>
            <div>
                <label for="proDesc">描述：</label>
                <input type="text" name="proDesc" id="proDesc" value="">
            </div>
            <div>

                <label for="companyLicPic">企业营业执照：</label>
                <input type="file" name="companyLicPic" id="companyLicPic"/>
                <font color="red"></font>
            </div>
            <div>

                <label for="orgCodePic">组织机构代码证：</label>
                <input type="file" name="orgCodePic" id="orgCodePic"/>
                <font color="red"></font>
            </div>
            <div class="providerAddBtn">
                <input type="button" name="add" id="add" value="保存">
                <input type="button" id="back" name="back" value="返回" >
            </div>
        </form>
    </div>
</div>
</section>
<%@include file="foot.jsp"%>
</body>
</html>
<script>
    $(function () {
        $("#back").click(function () {
            window.location = "providerlist.jsp";
        })

        $("#add").click(function () {
            document.forms[0].submit();
        })
    })
</script>